package mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import pages.User;

import java.util.List;

public interface UserMapper {

    /**
     * 根据ID查找用户
     * @param id
     * @return
     */
    User findUserById(int id);

    @Select("select id, mobile, name from myschema.t_user where id = #{id}")
    User findPostgreUserById(@Param("id") int id);

    void insertBatch(@Param("userList") List<User> userList);

    void updateOneByOne(@Param("userList") List<User> userList);


    void updateOne(@Param("user") User user);


    void postgreInsertBatch(@Param("userList") List<User> userList);

}
